""" 26进制
    1-26的索引
    % 取余
    // 取整除商
     """
def convertToTitle(columnNumber: int) -> str:
    # 生成对应字典
    x = list(range(26))
    y = [chr(num) for num in range(65,91)]
    z = dict(zip(x,y))
    res = ""
    # print(z)
    
    while columnNumber > 0:
        columnNumber -= 1 

        remainer = columnNumber % 26
        ch = z[remainer]
        res += ch
        columnNumber //= 26
    
    return res[::-1]


print(convertToTitle(1000))